#ifndef MFCCLIENT_H
#define MFCCLIENT_H

#include "ui_mfcclient.h"
#include "authorization.h"
#include "adddocument.h"
#include "printvipiska.h"
#include "loadlastdata.h"
#include "C:\Projects\VisualStudio\MFC\vipiska.h"

class MFCClient : public QMainWindow
{
	Q_OBJECT

public:
	MFCClient(QWidget *parent = 0, Qt::WFlags flags = 0);
	~MFCClient();

	QTcpSocket *tcpSocket;
	QDataStream socketStream;
	int port;
	QString ipAddress;

	vipiska record;
	QString FIOOperator;
	bool saveFlag;

private:
	Ui::MFCClientClass ui;
	void readConf();	
	bool connectToServer();

private slots:
	void saveData();
	void sendData();
	void receiveData();
	void addDoc();
	void delDoc();
	void clearWidgets();
	void printDoc();
	void loadDialog();
	void setOldRecord();
	void authDialog();
};

#endif // MFCCLIENT_H
